<template>
  <view class="office">
    <uni-indexed-list :options="list" :showSelect="false" @click="bindClick"></uni-indexed-list>
  </view>
</template>
<script>
  export default {
    data() {
      return {
        list: [{
          "letter": "E",
          "data": [
            "耳鼻喉科",
            "儿科1",
            "儿科2"
          ]
        }, {
          "letter": "F",
          "data": [
            "妇科1",
            "妇科2",
            "妇科3"
          ]
        }]
      }
    },
    methods: {
      bindClick({ item }) {
        console.log(item);
        const { name } = item
        this.goto(`/pages/office/detail?name=${name}`)
      },
      goto(url) {
        uni.navigateTo({
          url: url
        })
      }
    }
  }
</script>
<style lang="scss">
  .office {
    width: 100%;


  }

  .uni-indexed-list__title-wrapper {
    background-color: red;
  }
</style>